package text_2023_09_24;

import java.io.*;

/**
 * @author Vv
 * @version 1.0
 * @project coding_learn
 * @description
 * @date 2023/9/24 21:59:04
 */
public class Demo3 {
    public static void test08() throws IOException {
        File file = new File("d:/java24/text02.txt");
        FileWriter fileWriter = null;
        BufferedWriter bw = null;
        try {
            fileWriter = new FileWriter(file,true);
            bw = new BufferedWriter(fileWriter);
            bw.write("问：没声音么11111111111111111");
            bw.newLine();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }finally {
            bw.close();
            fileWriter.close();
        }
    }
    public static void main(String[] args) throws IOException {
//        File file = new File("d:/java24/text01.txt");
//        FileReader fr = new FileReader(file);
//        BufferedReader br = new BufferedReader(fr);
//        while(true){
//            String str = br.readLine();
//            if(str != null){
//                System.out.println(str);
//            }else{
//                break;
//            }
//        }
        test08();

    }
}
